package com.jianzong.lingxuan.error;

/**
 * 自定义异常
 *
 * @author xuyanbo
 * @date 2020/6/29
 */

public class CustomException extends Error {

    private IError error;

    /**
     * 异常消息参数
     */
    private Object[] args;

    public CustomException(String message) {
        super(message);
    }

    public CustomException(IError error) {
        super(error.getMessage());
        this.error = error;
    }

    public IError getError() {
        return this.error;
    }

    public CustomException(IError error, Object[] args, String message) {
        super(message);
        this.error = error;
        this.args = args;
    }

    public CustomException(IError error, Object[] args, String message, Throwable cause) {
        super(message, cause);
        this.error = error;
        this.args = args;
    }
}


